package com.atguigu.member.controller

import org.apache.spark.{SparkConf, SparkContext}

object tt2 {
  def main(args: Array[String]): Unit = {
    System.setProperty("HADOOP_USER_NAME", "root")
    val conf = new SparkConf().setMaster("local[4]").setAppName("rddcreate")
    val sc = new SparkContext(conf)
    sc.hadoopConfiguration.set("dfs.client.use.datanode.hostname", "true")
    sc.textFile("hdfs://hadoop112:8020/user/atguigu/ods/baseadlog.log").foreach(println(_))
  }
}
